//登录按钮
mui('body').on('tap', '.mui-btn', function() {
	if(isNull($('#account').val())) {
		mui.toast("请输入手机号码");
		return;
	}
	if(isNull($('#password').val())) {
		mui.toast("请输入密码");
		return;
	}
	var ajax = {
		"phone": $('#account').val(),
		"password": $('#password').val()
	}
	ajAjax("login.do", ajax, function(data) {
		mui.toast("登录成功")
		localStorage.setItem("userData", data.user);
		var _self = plus.webview.currentWebview().close();
		var opener = plus.webview.currentWebview().opener();
		mui.fire(opener,"back",{data:data.user});
		mui.back();
	}, function(err) {

	});
})

mui('body').on('tap', '#logizc', function() {
	mui.openWindow({
		url: 'reg.html',
		id: 'reg.html',
	});
})

mui('body').on('tap', '#wjmi', function() {
	mui.openWindow({
		url: 'forgetPsw.html',
		id: 'forgetPsw.html',
	});
})